package jxtend.processor.eclipse.visitor.handler;


import org.eclipse.jdt.internal.compiler.ast.Statement;
import org.eclipse.jdt.internal.compiler.lookup.Scope;

@SuppressWarnings("restriction")
/**
 * Interface for offering an alternative implementation of {@code Statement.resolveType(BlockScope)} /
 * {resolveType(ClassScope)}.
 * <p>
 * For example a class implementing {@link ASTNodeVisitorHandler} can also implement this interface to for example
 * resolve the type of an expression that cannot be resolved using {@code Expression.resolveType(BlockScope)}.
 * An array initializer does not (re)implement the {@code resolveType(BlockScope)} method (the default implementation
 * from {@code Expression} is empty) and thus will not work.
 * </p>
 *
 * @author Emil van Galen
 */
public interface StatementTypeResolver extends ASTNodeHandler {

	boolean resolveStatement(ASTNodeHandlerVisitorContext context, Statement node, Scope scope);
}
